package com.fortune.service;

import com.fortune.common.paging.PagingData;
import com.fortune.dto.in.dRole.DRoleAddDto;
import com.fortune.dto.in.dRole.DRoleEditDto;
import com.fortune.dto.in.dRole.DRoleListDto;
import com.fortune.entity.DPosition;
import com.fortune.vo.dRole.DRoleB;
import com.fortune.vo.dRole.DRoleDetail;

public interface DRoleService {

	/**
	 * 
	 * @param listDto
	 * @param mId
	 * @param dId
	 * @return
	 */
	PagingData<DRoleB> listRoles(DRoleListDto listDto, String mId, String dId);

	/**
	 * 
	 * @param mId
	 * @param dId
	 * @param roleId
	 * @return
	 */
	DRoleDetail getRoleDetail(String mId, String dId, String roleId);

	/**
	 * 
	 * @param name
	 * @param mId
	 * @param dId
	 * @return
	 */
	DPosition getPositionByMIdAndDIdAndName(String name, String mId, String dId);

	/**
	 * 
	 * @param addDto
	 * @param mId
	 * @param dId
	 * @return
	 */
	int insertRoleWithPermissions(DRoleAddDto addDto, String mId, String dId);

	/**
	 * 
	 * @param mId
	 * @param dId
	 * @param roleId
	 * @return
	 */
	DPosition getPositionByMIdAndDIdAndRoleId(String mId, String dId, String roleId);
	/**
	 * 
	 * @param name
	 * @param mId
	 * @param dId
	 * @param roleId
	 * @return
	 */
	DPosition getPositionByMIdAndDIdAndNameAndRoleId(String name, String mId, String dId, String roleId);

	/**
	 * 
	 * @param editDto
	 * @param mId
	 * @param dId
	 * @return
	 */
	int updateRoleWithPermissions(DRoleEditDto editDto, String mId, String dId);

	/**
	 * 
	 * @param mId
	 * @param dId
	 * @param roleId
	 * @return
	 */
	int deleteRole(String mId, String dId, String roleId);

}
